The present invention relates to a method for fine tuning of a robot program for a robot application comprising an industrial robot, a tool and a work object to be processed by the tool along a path comprising a number of desired poses on the work object, the robot program comprises a number of program instructions containing programmed poses corresponding to the desired poses. The method according to the invention is useful for fine tuning robot programs being programmed off-line as well as online.
The invention is particularly useful in robot application that demands high accuracy, such as different types of machining applications, for example fettling, debarring, milling, sawing, grinding and drilling. The application is also useful in applications such as arc welding, water jet cutting, laser cutting, gluing and assembly.
A robot program comprises a number of program instructions controlling the movements of the robot. The robot program is based on a number of programmed poses, defining the relation between the tool and the object. A pose is defined by both a position and an orientation. A programmed pose comprises the position and orientation that a tool is expected to obtain in relation to a work object when running the robot program. Generation of a robot program comprises a first step wherein the poses of the path are defined and a next step wherein program instructions are generated based on the defined poses.
A robot application is an application in which an industrial robot is used for performing a work. Robots are often used in applications involving processing of the surface of a work object. Existing practice for programming a robot involves on-line teaching the robot a sequence of poses. The poses define a robot path, which the robot shall follow during processing of the object. The robot is taught how to perform a task by leading the tool through the various positions and orientations along the desired path during the programming. The robot program is then generated, based on the programmed poses. However programming a robot by teaching can be time-consuming, especially if the work object has a complex geometry.
The accuracy of an application is limited mainly by the repeatability of the robot mechanics and the accuracy with which it is possible to move and rotate the tool to the desired position and orientation. In many high accuracy applications like machining, laser cutting, laser welding etc. the robot repeatability is good enough but it is very difficult for a human eye to find the correct position and orientation of the tool. Moreover, even if a robot programmer with long programming experience manages to obtain the accuracy needed, it will take a lot of time.
The utilization of high-level computer programming language and CAD/CAM has made off-line robot programming more feasible for more complex applications. An industrial robot has to be used with regards to the components of the robot workcell, such as the coordinate frames and the errors introduced by the components. The work object and tool coordinate systems have to be known with high accuracy relative to the robot coordinate system. Thus, calibration has been the key to use robot off-line programming. However, when the robot runs the off-line generated program after the calibration, there will still remain errors due to errors in the robot kinematic and error in the calibration of the object and tool coordinate system. Therefore, the calibration methods used today for calibrating the coordinate systems, does not provide high enough accuracy for applications having very high accuracy requirements.
The object of the present invention is to provide a method for fine tuning a robot program, which method increases the accuracy of the application.
This object is achieved by a method for fine tuning of a robot program for a robot application, wherein the method comprises: defining a fine tuning coordinate system, selecting one of said programmed poses, calculating said selected pose in the fine tuning coordinate system, producing one or more program instructions for said selected pose in the fine tuning coordinate system, running said one or more program instructions by the robot, determining the difference between the pose obtained after running said one or more program instructions and the desired pose, adjusting the fine tuning coordinate system in dependence of said difference, so that the obtained pose approaches the desired pose, producing one or more program instructions for said selected pose in the adjusted fine tuning coordinate system, and repeating the method for at least one more of the programmed poses.
Thereby, a new adjusted robot program is obtained, which provides a higher accuracy of the result of the processing of the work object. The same local fine tuning coordinate system could be used for reprogramming other programmed poses in the vicinity of said pose, or each pose on the path could be provided with its own local fine tuning coordinate system. By reprogramming a pose means that one or more new robot program instructions are generated for the pose and the previous program instructions are substituted by the new program instructions. The method according to the invention is applied after calibration and programming of the application. By this method a high accuracy could be obtained in each pose along the path.
The fine tuning coordinate system must be known relative to a coordinate system defined in relation to the robot. Normally, a robot coordinate system attached to the base of the robot is used as a reference coordinate system for the robot. Preferably, the fine tuning coordinate system is a coordinate system defined in a fixed relation to an object coordinate system defined in a fixed relation to the work object. The object coordinate system is usually already defined in relation to the robot coordinate system. A robot program instruction defines the programmed pose for a robot movement, the object coordinate system that the programmed pose is related to and the tool coordinate system defined on the robot. To be able to adjust the programmed target pose in relation to the object coordinate system, the fine tuning coordinate system is defined in relation to the object coordinate system and the target pose is defined relative the fine tuning coordinate system.
Another way of tuning the target pose is to define a fine tuning coordinate system in relation to the tool coordinate system and to use the fine tuning coordinate system as the tool coordinate system when the robot motion is calculated for a specific programmed pose.
In the case that a fine tuning coordinate system is needed for each target pose, the fine tuning coordinate system can be defined as a path coordinate system which changes its pose all the way along the path. It could also be possible in this case to use the position and orientation of the programmed pose itself, i. e. the fine tuning coordinate system is defined as a coordinate system having the same orientation and position as the selected pose. In the detailed description of the invention, the case when the fine tuning coordinate system is defined in relation to the object coordinate system is describes for simplicity.
According to an embodiment of the invention, the fine tuning is repeated for a following pose on the path, and comprises: calculating said following programmed pose in the local fine tuning coordinate system of the previous pose, running the robot program to said following programmed pose in the local fine tuning coordinate system of the previous pose, measuring the difference between the obtained following pose and the desired following pose, adjusting a copy of the local fine tuning coordinate system of the previous pose so that the following obtained pose approaches the desired pose, and saving the adjusted copy of the local fine tuning coordinate system as a local fine tuning coordinate system for said following pose. Thus, the local fine tuning coordinate system for the previous pose is used for determining a local fine tuning coordinate system for the following pose on the path. The advantage with this is that the less data is needed to define the fine tuning if poses close to each other share a fine tuning coordinate system with the same adjustment.
According to an embodiment of the invention the difference between the pose obtained and the desired pose, is measured by moving the robot from the obtained pose to the desired pose and recording the change in robot pose during said moving of the robot. Thus, the robot is used for measuring the difference between the pose obtained and the desired pose. The advantage of using the robot for the measurements is that no special measurement unit is needed.
According to an embodiment of the invention the obtained pose of the tool and the desired pose of the tool on the work object, are measured by means of a positioning measuring unit and the difference between the obtained and desired pose are calculated as the difference between the measurements from said measuring unit. Advantages with using a positioning measuring unit for the measurements are that the positioning measuring unit is easier and safer to use and provides higher accuracy of the measurements than measuring with the robot.
According to an embodiment of the invention the method comprises: adding an offset distance to the programmed pose, running the robot program to said programmed pose with the offset distance added and removing the offset distance before reprogramming the pose. To make it easier to measure on the work object and the tool, an offset distance is added to the poses on the programmed path. For example, if the tool is used to mill, grind or drill internal structures on the work object, an offset distance has to be added to the path positions to make it possible to perform the measurements. Preferably, said offset distance corresponds to a distance big enough to be able to measure between the tool and the work object with the positioning measuring unit.
According to an embodiment of the invention the method further comprises checking if there is a substantial difference between the obtained pose and the desired pose, when the programmed pose is defined in a fine tuning coordinate system adjusted for a previous pose, and if there is a substantial difference between the obtained and desired pose, the fine tuning coordinate system is adjusted based on said measured difference, so that the obtained pose approaches the desired pose, and the adjusted fine tuning coordinate system is saved as a local fine tuning coordinate system for the pose, and if there is not a substantial difference between the obtained and desired pose, the fine tuning coordinate system which was used for calculating the programmed poses is saved as the local fine tuning coordinate system. According to this embodiment an adjustment of the fine tuning coordinate system is only done if there is a significant difference between the desired pose and the obtained pose, otherwise no adjustment is made. Thus, if there are only small differences between the desired and the obtained poses, the same local fine tuning coordinate system adjusted for a previous pose is used for the poses.
Even if the tool is positioned accurately to the desired poses by the fine tuning method according to the previous embodiments, there may still be errors after processing the work object with the robot. That depends on the fact that the robot is not rigid, but compliant to the tool forces. According to an embodiment of the invention, the method further comprises procedures to compensate for the compliance of the robot comprising: measuring at least one pose along said path on a reference work object having a desired geometry, running the robot program for said application, whereby the tool processes a real work object, measuring at least one corresponding pose along said path on the processed real work object, calculating the difference between the measured pose on the reference work object and the corresponding measured pose on the processed work object, adjusting the local fine tuning coordinate system of the pose, in dependence of said calculated difference between the measured poses on the reference work object and on the processed work object, so that the pose on the processed work object approaches the pose on the reference work object, saving the adjusted local fine tuning coordinate system for the pose, and reprogramming the pose, based on the adjusted local fine tuning coordinate system for the pose. As the fine tuning method comprises an additional adjusting of the fine tuning coordinate systems and reprogramming of the poses on the path, the accuracy of the robot application is further improved. Preferably, a plurality of path poses on the reference work object and corresponding path poses on the processed work object are measured, and the fine tuning coordinate systems for the path poses will undergo an additional adjusting according to this embodiment of the invention.
Another object of the invention is to provide a computer program product for fine tuning an off-line programmed robot program comprising a number of programmed poses, defining the relation between a tool and a work object, to achieve an increased accuracy of the processing result on the work object. This object is achieved by a computer program product according to the corresponding appending claim, which when run on a computer execute the method according to the invention. The computer program product can be provided via any computer readable medium or via a network, such as the Internet.
It is easy to realize that the method according to the invention, as defined in the appending set of method claims, is suitable for being executed by a computer program having instructions corresponding to the steps in the inventive method when run on a processor unit. Even though not explicitly expressed in the claims, the invention covers a computer program product in combination with the method according to the appended method claims.
Another object of the invention is to provide a computer readable medium having a program recorded thereon for fine tuning of a robot program, where the program is to make a computer perform the steps of the aforementioned computer program product, when said program is run on the computer.
The computer program product may be run on a controller of the robot or on any other computer comprising a processor and suitable memory.